-- GENERATED SPELL FOR [Risen Protector] --


function spell0_10487(pUnit, Event) --@Shadow Shock,n/a--
pUnit:FullCastSpellOnTarget(17439,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10487', 600, 1)
end

function spell1_10487(pUnit, Event) --@Shadow Word: Pain,n/a--
pUnit:FullCastSpellOnTarget(15654,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10487', 18000, 1)
end

function spell2_10487(pUnit, Event) --@Silence,n/a--
pUnit:FullCastSpellOnTarget(6726,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10487', 5260, 1)
end

function Sorts_10487(pUnit, Event)
local choix_sorts_10487 = math.random(0, 2)
if choix_sorts_10487 == 0 then
pUnit:RegisterEvent('spell0_10487', 1, 1)
end
if choix_sorts_10487 == 1 then
pUnit:RegisterEvent('spell1_10487', 1, 1)
end
if choix_sorts_10487 == 2 then
pUnit:RegisterEvent('spell2_10487', 1, 1)
end
end

function mob10487_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_10487', math.random(1500, 3000), 1)
end

function mob10487_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10487_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10487_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(10487, 1, 'mob10487_Action')
RegisterUnitEvent(10487, 2, 'mob10487_Leave')
RegisterUnitEvent(10487, 3, 'mob10487_Kill')
RegisterUnitEvent(10487, 4, 'mob10487_Die')
